package com.fount4j.generator.info;

/**
 * 解析后数据库表列的实体类
 *
 * @author Morven 2016/12/20
 */
public class ColumnInfo {
    /** 数据库表别名 */
    private String tableAlias;
    /** 数据库表列名 */
    private String realName;
    /** 实体类属性名 */
    private String javaName;
    /** 实体类属性名（第一个字母大写，用于生成 get/set 方法） */
    private String javaNameUpper;
    /** 数据库表列的类型 */
    private int dbType;
    /** 数据库表列的类型名称 */
    private String dbTypeName;
    /** MyBatis JDBC 类型 */
    private String jdbcType;
    /** 数据库表实体类属性的 Java 类型 */
    private Class<?> javaType;
    /** 数据库表实体类属性的 Java 类型名 */
    private String javaTypeName;
    /** 数据库表列的长度 */
    private int len;
    /** 数据库表列的精确度 */
    private int scale;
    /**
     * 数据库表列的长度和精确度结合后的描述<br>
     * 长度和精确度都是0，该字段为空字符串<br>
     * 长度是18位，精确两位小数，该字段为“(18,2)”<br>
     * 长度是12位，精确度为0时，该字段为“(12)”
     */
    private String lenScale;
    /** 字段是否允许为空 */
    private boolean nullable;
    /** 列注释 */
    private String remarks;
    /** 默认值 */
    private String defaultValue;
    /** 是否是自增列 */
    private boolean autoIncrement;
    /** 是否是主键 */
    private boolean primaryKey;
    /** 映射文件中不为空的表达式，如“name != ''” */
    private String notEmptyExp;

    public String getTableAlias() {
        return tableAlias;
    }

    public void setTableAlias(String tableAlias) {
        this.tableAlias = tableAlias;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getJavaName() {
        return javaName;
    }

    public void setJavaName(String javaName) {
        this.javaName = javaName;
    }

    public String getJavaNameUpper() {
        return javaNameUpper;
    }

    public void setJavaNameUpper(String javaNameUpper) {
        this.javaNameUpper = javaNameUpper;
    }

    public int getDbType() {
        return dbType;
    }

    public void setDbType(int dbType) {
        this.dbType = dbType;
    }

    public String getJdbcType() {
        return jdbcType;
    }

    public void setJdbcType(String jdbcType) {
        this.jdbcType = jdbcType;
    }

    public Class<?> getJavaType() {
        return javaType;
    }

    public void setJavaType(Class<?> javaType) {
        this.javaType = javaType;
    }

    public int getLen() {
        return len;
    }

    public void setLen(int len) {
        this.len = len;
    }

    public int getScale() {
        return scale;
    }

    public void setScale(int scale) {
        this.scale = scale;
    }

    public String getLenScale() {
        return lenScale;
    }

    public void setLenScale(String lenScale) {
        this.lenScale = lenScale;
    }

    public boolean isNullable() {
        return nullable;
    }

    public void setNullable(boolean nullable) {
        this.nullable = nullable;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public boolean isAutoIncrement() {
        return autoIncrement;
    }

    public void setAutoIncrement(boolean autoIncrement) {
        this.autoIncrement = autoIncrement;
    }

    public String getDbTypeName() {
        return dbTypeName;
    }

    public void setDbTypeName(String dbTypeName) {
        this.dbTypeName = dbTypeName;
    }

    public String getJavaTypeName() {
        return javaTypeName;
    }

    public void setJavaTypeName(String javaTypeName) {
        this.javaTypeName = javaTypeName;
    }

    public boolean isPrimaryKey() {
        return primaryKey;
    }

    public void setPrimaryKey(boolean primaryKey) {
        this.primaryKey = primaryKey;
    }

    public String getNotEmptyExp() {
        return notEmptyExp;
    }

    public void setNotEmptyExp(String notEmptyExp) {
        this.notEmptyExp = notEmptyExp;
    }
}
